import{h as e,render as t}from"vue";import{ElMessage as o,ElIcon as n}from"element-plus";import{CopyDocument as a}from"@element-plus/icons-vue";import{stringUtil as r,withInstallDirective as c}from"@fast-china/utils";const i=c({mounted(c,i){if(c.copyData=i.value,!c.copyData)return;const m=e(n,{class:"fa__copy-icon",title:"复制",onClick:async()=>{try{await r.copy(String(c.copyData)),o({type:"success",message:"复制成功"})}catch(e){throw o({type:"error",message:"复制失败"}),e}}},{default:()=>e(a)}),l=document.createElement("div");t(m,l),c.__iconElement__=l.firstChild,c.parentElement.insertBefore(l.firstChild,c)},updated(e,t){e.copyData=t.value},beforeUnmount(e){e.__iconElement__&&e.parentElement.removeChild(e.__iconElement__)}},"iconCopy");export{i as default,i as vIconCopy};
//# sourceMappingURL=index.mjs.map
